package top.zhangjianyong.blog.params.comment;

import top.zhangjianyong.blog.validation.ListValue;

/**
 * 评论分页查询参数
 *
 * @author zhangjianyong
 * @since 2024/12/19
 */
public record CommentPageParam(
    String keyword,
    Long blogId,
    @ListValue(
            values = {0, 1, 2},
            message = "状态仅允许输入：0-初始 1-通过 2-拒绝")
        Integer status,
    @ListValue(
            values = {0, 1},
            message = "新回复状态仅允许输入：0-无 1-有")
        Integer reply,
    Integer pageNum,
    Integer pageSize) {
  public CommentPageParam {
    if (pageNum == null) pageNum = 1;
    if (pageSize == null) pageSize = 10;
  }
}
